<?php
  //=========================<script réalisé par :MOUMMID HAMZA>===================
include_once('connectBD.php');
include_once('beans/tacheBean.php');
include_once('dao/nomadeDao.php');
include_once('configuration.php');

class interventionDao{

  public $listeIntervention= array();
  

   public function loadInterventions($nc){
     $req=connexion()->prepare("select * from tache t,intervention i where t.idTache=i.idTache and i.idNomadeCible=$nc group by i.idIntervention");
     $req->execute();

     while($row = $req->fetch(PDO::FETCH_OBJ)) {
       $intervention=new interventionBean();
       $intervention->setIdTache($row->idTache);
       $intervention->setObjectif($row->objectif);
       $intervention->setDesignation($row->designation);
       $intervention->setDateDebut($row->dateDebut);
       $intervention->setIdIntervention($row->idIntervention);
       $intervention->setIdNomade($row->idNomade);
       $intervention->setIdNomadeCible($row->idNomadeCible);

       $listeIntervention[]=$intervention;
         }

       return $listeIntervention;
  }



}

?>
